package com.gxa.controller;

import com.gxa.service.EchartsService;
import com.gxa.service.impl.EchartsServcieImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class EchartsController {

    @Autowired
    private EchartsService echartsService;

    @RequestMapping(value = "/findSales",method = RequestMethod.GET)
    @ResponseBody
    public Map findSales(String createTime){
        Map resultMap =  echartsService.findSalesDataByCreateTime(createTime);
        return resultMap;
    }

}
